/**
 * Created by LeungZ on 2016/3/24.
 */
import './article.scss';
import temp from './article.html';

class ArticleDrct {
    constructor() {
        this.replace = true;
        this.restrict = 'E';
        this.scope = {};
        this.templateUrl = temp;
    }

    controller($scope) {
        "ngInject";
        $scope.$on('$stateChangeStart', function () {
            $scope.showLoadingWrapper = true;
        });
        $scope.$on('$stateChangeSuccess', function () {
            $scope.$root.$broadcast('$updateNavMenu');
            $scope.showLoadingWrapper = false;
        });
    }

    static factory() {
        return new ArticleDrct();
    }
}
export default ArticleDrct